{% extends "moban1788/base.html" %}
{% block head %}
    <script>
        $(document).ready(function(){
            $("#encryption").click(function(){
                var encry = $("#encry").val();
                if (encry == ''){
                    sweetAlert("", "加密内容不能为空,请输入加密数据", "info");
                    return false;
                }
            });
             $("#decrypta").click(function(){
                var  decry= $("#decry").val();
                if (decry == ''){
                    sweetAlert("", "解密内容不能为空,请输入解密数据", "info");
                    return false;
                }
            });
            $("#encryption1").click(function(){
                var encry = $("#encry1").val();
                if (encry == ''){
                    sweetAlert("", "加密内容不能为空,请输入加密数据", "info");
                    return false;
                }
            });
             $("#decrypta1").click(function(){
                var  decry= $("#decry1").val();
                if (decry == ''){
                    sweetAlert("", "解密内容不能为空,请输入解密数据", "info");
                    return false;
                }
            });
        });
    </script>
{% endblock %}
{% block main %}
<div class="page-title cart-title">
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-12 text-center p-static">
        <div class="page-heading">
          <h2 class="white text-uppercase fz-36 ls-2">加解密工具</h2>
          <h6 class="work-sans fz-15 white mt-20">首页   <span class="mlr-10"> / </span>  工具箱</h6>
        </div>
      </div>
    </div>
  </div>
</div>
<section class="pt-150">
    <div class="container">
        <div class="row">
            <div class="col-md-12 text-center">
                <h1 class="text-uppercase ls-3 bb gray-de"><span class="yellow"> 加解密</span> 工具</h1>
                <p class="mt-50 fz-15">
                    用于加解密端上上传或者返回的解密数据,同时也可以json字符串进行加密.
                </p>
            </div>
        </div>
            <div class="row" style="margin-top: 6%">
                <div class="col-lg-1">
                    <strong style="font-weight:bold;font-size: large; color: #8A8F94;padding-left: 14%;">Andriod:</strong>
                </div>
                <div class="col-lg-5" style="padding-left: 5%;margin-top: 5px">
                    <form method= 'get'>
                        <input name="decry_android" id="decry" class="input-sm" style="width: 80%;" placeholder="请输入解密数据">
                        <input type="submit" id='decrypta' class='btn btn-info' value='解密'/>
                    </form>
                </div>
                <div class="col-lg-5" style="padding-left: 5%;margin-top: 5px">
                    <form method= 'get'>
                        <input name="encry_android" id="encry" class="input-sm" style="width: 80%;" placeholder="请输入加密数据" >
                        <input type="submit" id='encryption' class='btn btn-info' value='加密' />
                    </form>
                </div>
            </div>
            <br>
            <div class="row">
                <div class="col-lg-1">
                    <strong style="font-weight:bold;font-size: large; color: #8A8F94;padding-left: 14%;">IOS:</strong>
                </div>
                <div class="col-lg-5"  style="padding-left: 5%;margin-top: 5px">
                    <form method= 'get'>
                        <input name="decry_ios" id="decry1" class="input-sm" style="width: 80%;" placeholder="请输入解密数据">
                        <input type="submit" id='decrypta1' class='btn btn-info' value='解密'/>
                    </form>
                </div>
                <div class="col-lg-5" style="padding-left: 5%;margin-top: 5px">
                    <form method= 'get'>
                        <input name="encryp_ios" id="encry1" class="input-sm" style="width: 80%;" placeholder="请输入加密数据" >
                        <input type="submit" id='encryption1' class='btn btn-info' value='加密' />
                    </form>
                </div>
            </div>
            <div class="col-lg-12" style="min-height: 400px;">
                <br>
                <span style="font-weight:bold;font-size: large; color: #8A8F94;">结果:</span><br>
                {% if state == 2 %}
                    <h4 style="text-align: center;padding-top: 60px;"><img src="../static/icon/fail.gif"/>{{ result }}</h4>
                {% elif state == 0 %}
                    <h4 style="text-align: center;padding-top: 60px;"><img src="../static/icon/scare.gif"/>&nbsp;{{ result }}</h4>
                {% else %}
                <div style="padding-left: 60px;word-wrap:break-word; word-break:break-all; overflow: hidden;width: 700px;margin-top: 20px;">{{ result }}</div>
                {% endif %}
            </div>
          </div>
</section>
{% endblock %}
{% block js %}
    <script src="../../../qa/static/js/plugins/morris/raphael.min.js"></script>
    <script src="../../../qa/static/js/plugins/morris/morris.min.js"></script>
    <script src="../../../qa/static/js/plugins/morris/morris-data.js"></script>
    <script src="../../../qa/static/js/sweet-alert.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../qa/static/css/sweet-alert.css">
    <script src="../../../qa/static/js_new/jquery-1.12.4.min.js"></script>
    <script src="../../../qa/static/js_new/bootstrap.min.js"></script>
{% endblock %}